﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.ModelConfiguration.Conventions.Edm.Db;
using System.Linq;
using System.Text;
using Wicresoft.Logger.Entity;
using Wicresoft.Task.Common.Entity;
using Wicresoft.Task.Team.Entity;

namespace Wicresoft.Test
{
    class GenericContext : DbContext
    {
        public DbSet<Log> Logs { get; set; }
        public DbSet<Email> Emails { get; set; }
        public DbSet<ShelveInfo> ShelveInfoes { get; set; }
        public DbSet<Employee> EmployeesInfoes { get; set; }
        public DbSet<ChangeListInfo> ChangeListInfoes { get; set; }
        public DbSet<WorkItemInfo> WorkItemInfoes { get; set; }
        public DbSet<ProjectCollection> Constants { get; set; }
        public DbSet<ChangesetInfo> ChangesetInfoes { get; set; }
        public DbSet<Area> Areas { get; set; }


        // EFCodeFirst Bug: 必须去除表结构复数命名规范
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
